'use strict';
exports.main = async (event, context) => {
	//event为客户端上传的参数
	console.log('event : ', event)
	const db = uniCloud.database()
	const query = await db.collection("opendb-app-versions").where({
		appid: "__UNI__565899D"
	}).orderBy("create_date", "desc").get()
	if(!query){
		return {
			code: 0,
			data: [],
			msg: "执行失败"
		}
	}
	return {
		code: 1,
		data: query.data,
		msg: "执行成功"
	}
};
